"""
Created on 12-Aug-2009

@author: dexen
"""

DEAD = -1
ALIVE = -2

class Individual(object):
    def __init__(self):
        pass
       
    def kill(self):
        self.life_state = DEAD
    
    def revive(self):
        self.life_state = ALIVE
    
    def __isalive__(self):
        return self.life_state == ALIVE
        
    def __setattr__(self, name, value):
        if name == "__modified__":
            object.__setattr__(self, name, value)
            return
        if not hasattr(self, "__modified__"):
            self.__modified__ = {}
        self.__modified__[name] = value
        object.__setattr__(self, name, value)
    
    def _isnew(self):
        return not hasattr(self, "__id__")
               
    def __get_evaluation_scores__(self):
        pass
    
    

    